Skip to content

Commit

Permalink
create a staked widget that accepts rules
Browse files Browse the repository at this point in the history
  • Loading branch information
TurBoss committed Feb 20, 2020
1 parent 68c51f3 commit 5fe8d81
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qtpyvcp/widgets/containers/designer_plugins.py
Expand Up @@ -13,3 +13,10 @@ def pluginClass(self):
return VCPWidget
def isContainer(self):
return True

from stack import VCPStackedWidget
class VCPStackedWidgetPlugin(_DesignerPlugin):
def pluginClass(self):
return VCPStackedWidget
def isContainer(self):
return True
18 changes: 18 additions & 0 deletions qtpyvcp/widgets/containers/stack.py
@@ -0,0 +1,18 @@


from qtpy.QtWidgets import QStackedWidget
from qtpyvcp.widgets.base_widgets import VCPWidget


class VCPStackedWidget(QStackedWidget, VCPWidget):
"""VCPStackedWidget
VCP Stacked Widget
A widget Stack that can be controlled via rules.
"""
DEFAULT_RULE_PROPERTY = 'Enable'

def __init__(self, parnet):
super(VCPStackedWidget, self).__init__(parent=parnet)

0 comments on commit 5fe8d81

Please sign in to comment.